<!doctype html>
<html lang="en">

<head>
    <title>后台管理系统</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <!-- VENDOR CSS -->
    <link rel="stylesheet" href="/public2/vendor/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/public2/vendor/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/public2/vendor/linearicons/style.css">
    <link rel="stylesheet" href="/public2/vendor/chartist/css/chartist-custom.css">
    <!-- MAIN CSS -->
    <link rel="stylesheet" href="/public2/css/main.css">
    <!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
    <link rel="stylesheet" href="/public2/css/demo.css">
    <!-- GOOGLE FONTS -->
    <!-- <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet"> -->
    <!-- ICONS -->
    <link rel="apple-touch-icon" sizes="76x76" href="/public2/img/apple-icon.png">
    <link rel="icon" type="image/png" sizes="96x96" href="/public2/img/favicon.png">
    <script src="/public2/vendor/jquery/jquery.min.js"></script>
    <script src="/public2/vendor/bootstrap/js/bootstrap.min.js"></script>
    <script src="/public2/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
    <script src="/public2/vendor/jquery.easy-pie-chart/jquery.easypiechart.min.js"></script>
    <script src="/public2/vendor/chartist/js/chartist.min.js"></script>
    <script src="/public2/scripts/klorofil-common.js"></script>
    <style>
        #img-container{
            max-height: 100px;
            margin: 30px 0;
        }
        #img-container>img{
            max-height: 100px;
        }
        #title{
            width: 800px;
        }
    </style>
</head>

<body>
    <!-- WRAPPER -->
    <div id="wrapper">
        <% include bar.html %>
        <%- body %>
    </div>
</body>
<script>
    //读取cookies
    function getCookie(name) {
        var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");

        if (arr = document.cookie.match(reg))

            return (arr[2]);
        else
            return null;
    }
    //删除cookies
    function delCookie(name) {
        var exp = new Date();
        exp.setTime(exp.getTime() - 1);
        var cval = getCookie(name);
        if (cval != null)
            document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
    }
    $(function () {
        $('#sidebar-nav').find('a').each(function(k,v){
            if($(this).attr('href')===window.location.pathname){
                $(this).addClass('active')
            }
        })
        $('#logout').on('click', function () {
            delCookie('token');
            window.location = '/admin/login';
        });


    })
</script>

</html>